<?xml version="1.0" encoding="UTF-8"?>
<web-app version="3.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
	xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
	id="WebApp_ID">
	<display-name>noticias-web</display-name>

	<welcome-file-list>
		<welcome-file>index.xhtml</welcome-file>
	</welcome-file-list>
	
	<context-param>
	    <param-name>org.richfaces.skin</param-name>
	    <param-value>blueSky</param-value>
	</context-param>

	<context-param>
		<param-name>javax.faces.STATE_SAVING_METHOD</param-name>
		<param-value>client</param-value>
	</context-param>

	<servlet>
		<servlet-name>Faces Servlet</servlet-name>
		<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
		<load-on-startup>1</load-on-startup>
	</servlet>

	<session-config>
		<session-timeout>5</session-timeout>
	</session-config>

	<servlet-mapping>
		<servlet-name>Faces Servlet</servlet-name>
		<url-pattern>*.jsf</url-pattern>
		<url-pattern>*.faces</url-pattern>
		<url-pattern>*.xhtml</url-pattern>
		<url-pattern>/faces/*</url-pattern>
	</servlet-mapping>
	
	<servlet>
		<servlet-name>Servlet padrao para Download</servlet-name>
		<servlet-class>br.com.news.web.utils.ServletDownload</servlet-class>
		<load-on-startup>3</load-on-startup>
	</servlet>
	
	<servlet-mapping>
		<servlet-name>Servlet padrao para Download</servlet-name>
		<url-pattern>/ServletDownload</url-pattern>
	</servlet-mapping>
	
	<listener>
		<listener-class>com.sun.faces.config.ConfigureListener</listener-class>
	</listener>

	<!-- Configuração do Spring -->
	<context-param>
		<param-name>contextConfigLocation</param-name>
		<param-value>/WEB-INF/applicationContext.xml</param-value>
	</context-param>
	<context-param>
    	<param-name>org.richfaces.fileUpload.maxRequestSize</param-name>
    	<param-value>300000</param-value>
	</context-param>
	<listener>
		<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
	</listener>
	<listener>
		<listener-class>org.springframework.web.context.request.RequestContextListener</listener-class>
	</listener>

	<filter>
		<filter-name>permissionFilter</filter-name>
		<filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class>
	</filter>
	<filter-mapping>
		<filter-name>permissionFilter</filter-name>
		<url-pattern>/*</url-pattern>
	</filter-mapping>
	
</web-app>